import { createRouter, createWebHashHistory } from 'vue-router'
//登录
const Login = () => import("@/views/Login.vue")
//主页
const HomeView = () => import("../views/HomeView.vue")
//工作台
const WorkBench = () => import("../components/WorkBench/WorkBench.vue")
//签约管理   ContractManage  
//签约列表
const ContractList = () => import("../components/ContractManage/ContractList.vue")
//待审核签约
const PendingContract = () => import("../components/ContractManage/DisposeContract.vue")
//待支付签约  
const UnpaidContract = () => import("../components/ContractManage/DisposeContract.vue")
//已驳回签约   
const RejectContract = () => import("../components/ContractManage/DisposeContract.vue")
//已完成签约  
const FinishContract = () => import("../components/ContractManage/DisposeContract.vue")
//未完成签约   
const UnfinshContract = () => import("../components/ContractManage/DisposeContract.vue")
//编辑签约信息  
const EditContract = () => import("../components/ContractManage/EditContract.vue")

//服务管理  ServeManage
// 服务列表
const ServeList = () => import("../components/ServeManage/ServeList.vue")
// 待审核服务  
const PendingServe = () => import("../components/ServeManage/DisposeServe.vue")
// 待支付服务
const UnpaidServe = () => import("../components/ServeManage/DisposeServe.vue")
// 已驳回服务
const RejectServe = () => import("../components/ServeManage/DisposeServe.vue")
// 已完成服务 
const FinishServe = () => import("../components/ServeManage/DisposeServe.vue")
// 未完成服务 
const UnfinshServe = () => import("../components/ServeManage/DisposeServe.vue")
// 编辑服务记录
const EditServe = () => import("../components/ServeManage/EditAddServe.vue")
// 新增服务记录
const AddServe = () => import("../components/ServeManage/EditAddServe.vue")

//居民管理  ResidentManage
//居民列表 
const ResidentList = () => import("../components/ResidentManage/ResidentList.vue")
//居民详情
const ResidenDetail = () => import("../components/ResidentManage/ResidenDetail.vue")
//新建居民档案
const AddResiden = () => import("../components/ResidentManage/AddResiden.vue")
//完善居民详情
const CompleteResiden = () => import("../components/ResidentManage/CompleteResiden.vue")

//消息管理 MessageManage
//消息列表
const MessageList = () => import("../components/MessageManage/MessageList.vue")

//资料管理 DataManage
//机构管理  InstManage
//机构列表
const InstList = () => import("../components/DataManage/InstManage/InstList.vue")
//新增机构
const AddInst = () => import("../components/DataManage/InstManage/EditAddInst.vue")
//编辑机构
const EditInst = () => import("../components/DataManage/InstManage/EditAddInst.vue")

//团队管理 TeamManage
//团队列表
const TeamList = () => import("../components/DataManage/TeamManage/TeamList.vue")
//新增团队
const AddTeam = () => import("../components/DataManage/TeamManage/AddTeam.vue")
//管理团队详情
const ManageTeam = () => import("../components/DataManage/TeamManage/ManJoinTeam.vue")
//加入团队详情
const JoinTeam = () => import("../components/DataManage/TeamManage/ManJoinTeam.vue")

//医生管理  DoctorManage
//医生列表 
const DoctorList = () => import("../components/DataManage/DoctorManage/DoctorList.vue")
//新增医生
const AddDoctor = () => import("../components/DataManage/DoctorManage/EditAddDoctor.vue")
//编辑医生
const EditDoctor = () => import("../components/DataManage/DoctorManage/EditAddDoctor.vue")
//医生详情
const Managedoctor = () => import("../components/DataManage/DoctorManage/Managedoctor.vue")

//服务包管理 SerPackManage
// 服务包列表
const SerPackList = () => import("../components/DataManage/SerPackManage/SerPackList.vue")
// 新增服务包  
const AddSerPack = () => import("../components/DataManage/SerPackManage/EditAddSerPack.vue")
// 编辑服务包
const EditSerPack = () => import("../components/DataManage/SerPackManage/EditAddSerPack.vue")
// 待审核服务包
const PendingSerPack = () => import("../components/DataManage/SerPackManage/DisposeSerPack.vue")
// 使用中服务包
const UsingSerPack = () => import("../components/DataManage/SerPackManage/DisposeSerPack.vue")
// 已停用服务包
const BlockSerPack = () => import("../components/DataManage/SerPackManage/DisposeSerPack.vue")
// 已驳回服务包
const RegectSerPack = () => import("../components/DataManage/SerPackManage/DisposeSerPack.vue")

//服务项目管理 SerProManage
//服务项目列表
const SerProList = () => import("../components/DataManage/SerProManage/SerProList.vue")
//新增服务项目
const AddSerPro = () => import("../components/DataManage/SerProManage/EditAddSerPro.vue")
//编辑服务项目
const EditSerPro = () => import("../components/DataManage/SerProManage/EditAddSerPro.vue")

// 业务目标管理 BusineManage
// 业务列表 
const BusineList = () => import("../components/DataManage/SerProManage/BusineList.vue")

const routes = [
  //重载
  {
    path: '/',
    redirect: "/login"
  },
  //登录
  {
    path: '/login',
    name: 'login',
    component: Login
  },
  //主页
  {
    path: "/home",
    name: "name",
    component: HomeView,
    children: [
      {
        path: "/",
        redirect: "/workbench"
        // component: HomeView
      },
      //工作台
      {
        path: "/workbench",
        name: "WorkBench",
        component: WorkBench
      },
      //签约列表
      {
        path: "/contractlist",
        name: "ContractList",
        component: ContractList
      },
      //待审核签约  
      {
        path: "/pendingcontract",
        name: "PendingContract",
        component: PendingContract
      },
      //待支付签约  
      {
        path: "/unpaidcontract",
        name: "UnpaidContract",
        component: UnpaidContract
      },
      //已驳回签约
      {
        path: "/rejectcontract",
        name: "RejectContract",
        component: RejectContract
      },
      //已完成签约 
      {
        path: "/finishcontract",
        name: "FinishContract",
        component: FinishContract
      },
      //未完成签约 
      {
        path: "/unfinshcontract",
        name: "UnfinshContract",
        component: UnfinshContract
      },
      //编辑签约信息
      {
        path: "/editcontract",
        name: "EditContract",
        component: EditContract
      },
      //服务列表
      {
        path: "/servelist",
        name: "ServeList",
        component: ServeList
      },
      //待审核服务  
      {
        path: "/pendingserve",
        name: "PendingServe",
        component: PendingServe
      },
      //待支付服务
      {
        path: "/unpaidserve",
        name: "snpaidserve",
        component: UnpaidServe
      },
      //已驳回服务
      {
        path: "/rejectserve",
        name: "RejectServe",
        component: RejectServe
      },
      //已完成服务 
      {
        path: "/finishserve",
        name: "FinishServe",
        component: FinishServe
      },
      //未完成服务 
      {
        path: "/unfinshserve",
        name: "UnfinshServe",
        component: UnfinshServe
      },
      //编辑服务记录
      {
        path: "/editserve",
        name: "EditServe",
        component: EditServe
      },
      //新增服务记录
      {
        path: "/addserve",
        name: "AddServe",
        component: AddServe
      },
      //居民列表 
      {
        path: "/residentlist",
        name: "ResidentList",
        component: ResidentList
      },
      //居民详情 
      {
        path: "/residendetail",
        name: "ResidenDetail",
        component: ResidenDetail
      },
      //新建居民档案 
      {
        path: "/addresiden",
        name: "AddResiden",
        component: AddResiden
      },
      //完善居民详情 
      {
        path: "/CompleteResiden",
        name: "CompleteResiden",
        component: CompleteResiden
      },
      //完善居民详情 
      {
        path: "/messagelist",
        name: "MessageList",
        component: MessageList
      },
      //机构管理
      {
        path: "/datamanage",
        name: "InstList",
        component: InstList,
        children: [
          {
            path: "/",
            redirect: "/instlist"
          },
          //机构列表
          {
            path: "/instlist",
            name: "InstList",
            component: InstList,
          },
          //新增机构
          {
            path: "/addinst",
            name: "AddInst",
            component: AddInst,
          },
          //编辑机构
          {
            path: "/editinst",
            name: "EditInst",
            component: EditInst,
          },
          //编辑机构
          {
            path: "/editinst",
            name: "EditInst",
            component: EditInst,
          },
        ]
      },
    ]

  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
